from tkinter import *

root=Tk()


text=Text(root,width=30,height=5)
text.pack()

text.insert(INSERT,"i love \n")
text.insert(END,"you")

def show():
    print("哎呀，我被点了")

b1=Button(text,text="点我呀",command=show)

text.window_create(INSERT,window=b1)

mainloop()
